package com.junlaninfo.entity;

/**
 * Created by 辉 on 2020/12/7.
 */
public class UserEntity {
    private String username;
    private Integer age;

    public UserEntity(String username, Integer age) {
        this.username = username;
        this.age = age;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        } else {
            UserEntity  userEntity= ((UserEntity) obj);
            return userEntity.username.equals(username)&&userEntity.age.equals(age);
        }
    }

    @Override
    public int hashCode() {
        return   username.hashCode()+age.hashCode();
    }
}
